function [ xn ] = XnGen( N )
%XNGEN Summary of this function goes here
%   Detailed explanation goes here
z = zeros(1,N);
n = (1:N);
v = wgn(1,N,0.101043);
a1 = -0.850848;
f1 = 0.05;
f2 = 0.40;
f3 = 0.42;
for k = 1:N
    if(k == 1)
        z(1) = v(1);
    else
        z(k) = -a1*z(k-1) + v(k);
    end
end
xn = 2*cos(2*pi*f1*n)+2*cos(2*pi*f2*n)+2*cos(2*pi*f3*n)+z;
end

